import moment from 'moment'
const lock_field = {
    "addDisplay": false,
    "addDisabled": false,
    "editDisplay": false,
    "editDisabled": true,
    "showColumn": false,
};
export const tableOption = {
    "border": true,
    "index": true,
    "indexLabel": "序号",
    "stripe": true,
    "menuAlign": "center",
    "align": "center",
    "searchMenuSpan": 6,
    "span": 24,
    dialogWidth: 800,
    "column": [{
        ...lock_field,
        "type": "input",
        "label": "编号",
        "prop": "jiangchengId"
    }, {
        ...lock_field,
        "type": "input",
        "label": "学籍号",
        "prop": "jiangchengStudent"
    }, {
        ...lock_field,
        "type": "input",
        "label": "学期编号",
        "prop": "jiangchengTerm"
    }, {
        "type": "input",
        "label": "处罚类别",
        "prop": "jiangchengType",
        rules: [{ required: true, message: "必填内容，不能为空", trigger: "blur" }],
        span: 14
    }, {
        "type": "radio",
        "label": "是否违法",
        "prop": "jiangchengaWeifa",
        "button": true,
        value: false,
        dicData: [
            { label: "否", value: false },
            { label: "是", value: true }
        ],
        rules: [{ required: true, message: "必填内容，不能为空", trigger: "blur" }],
        span: 10
    }, {
        "type": "input",
        "label": "处罚部门",
        "prop": "jiangchengDepartment",
        rules: [{ required: true, message: "必填内容，不能为空", trigger: "blur" }],
    }, {
        "type": "daterange",
        "label": "处罚时间",
        "prop": "jiangchengDate",
        "span": 14,
        "format": "yyyy-MM-dd",
        "valueFormat": "yyyy-MM-dd 00:00:00",
        "value": [moment().format('YYYY-MM-DD 00:00:00'), moment().format('YYYY-MM-DD 00:00:00')],
        formatter: (row, value, label, column) => { return value.join(' 至 ').replace(/00:00:00/g, '') },
        rules: [{ required: true, message: "必填内容，不能为空", trigger: "blur" }],
    }, {
        "type": "textarea",
        "label": "处罚原因与依据",
        "prop": "jiangchengContent",
        rules: [{ required: true, message: "必填内容，不能为空", trigger: "blur" }],
    }, {
        ...lock_field,
        "type": "input",
        "label": "创建人",
        "prop": "jiangchengCreateUser"
    }, {
        ...lock_field,
        "type": "input",
        "label": "",
        "prop": "jiangchengCreateTime"
    }, {
        ...lock_field,
        "type": "input",
        "label": "审核人",
        "prop": "jiangchengApproveUser"
    }, {
        ...lock_field,
        "type": "input",
        "label": "",
        "prop": "jiangchengApproveTime"
    }],
    group: [{
        label: "附件",
        column: [{
            "type": "upload",
            "label": "附件",
            "prop": "attachment",
            "action": "/szpj/file/zp_jiang_cheng/upload",
            "multiple": true,
            rules: [{ required: true, message: "必填内容，不能为空", trigger: "blur" }],
        }],
    }],

}